PHP-5.5.x + Xdebug + Zend Studio 调试环境设置
为什么不用zend debugger,反而舍本求末用个偏方呢?因zend debugger目前最高只支持到php-5.3.x,php-5.4.x和php-5.5.x搞不定,所以需要xdebug,它就一备胎.
1、下载安装xdebug
1.1 到http://xdebug.org/download.php 下载适合你的PHP版本的xdebug
1.2 复制到php安装目录的ext文件夹,改名为php_xdebug.dll
1.3 配置xdebug
在php.ini尾部添加如下:
- [xdebug]
- zend_extension="php_xdebug.dll"
- xdebug.remote_enable = On
- xdebug.remote_host = "localhost"
- xdebug.remote_port = 9000
- xdebug.remote_handler = "dbgp"
- xdebug.auto_trace = 1
- xdebug.collect_includes = 1
- xdebug.collect_params = 1
- xdebug.collect_return = 1
- xdebug.default_enable = 1
- xdebug.collect_assignments = 1
- xdebug.collect_vars = 1
- xdebug.remote_autostart = 1
- xdebug.remote_connect_back = 1
- xdebug.show_local_vars = 1
- xdebug.show_exception_trace = 0
运行phpinfo();看有xdebug模块信息出来就是搞定了。
2、配置Zend Studio 支持xdebug
这里的配置很重要,选择Zend Studio 的 Window 》 Preference 》 PHP 》Installed Debuggers 双击 Xdebug,Debug Port 设为跟php.ini中设置的一样(默认是9000)。
Accept remote session(JIT) 选择localhost,允许浏览器访问网站时zend studio自动打开文件开始调试.
选项说明:http://www.phpfensi.com
off: 关闭浏览器访问时打开调试功能;
localhost: 通过localhost访问网页的时候打开调试。
any:只要访问服务器上的php都打开调试;
prompt:访问服务器上的php时弹出询问是否要调试。
一旦打开zend studio允许xebug调试,所有访问php页面都会进入调试,我们可以使用easy xdebug火狐插件可在客户端控制是否开启调试.
1、首先php.ini设置
xdebug.remote_autostart = 0
不自动启动调试。
2、安装火狐插件easy xdebug,
安装好该插件后,点击如下图右下角小绿虫后,虫子上面有个小红点,这时候我们访问测试服务器的时候,Zend Studio就回自动弹出调试.
另外,可设置使用xdebug,在zend studio中对直接调试php文档,这里就不多说了.
Views – 61
相关热词: php
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/jiaob/php/3743.shtml
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
9. PHPDebugbar PHPDebugbar也是
时间:2021-01-13
-
10个免费的PHP编辑器/开拓
时间:2021-01-13
-
2019年最好用的10个php开拓
时间:2021-01-13
-
在casescheme:下面加入 retu
时间:2021-01-13
-
php实现将wav文件转换成图
时间:2021-01-11
-
PHP判断是否为空的几个函
时间:2021-01-11
-
护卫神php套件 php版本升级
时间:2021-01-10
-
浅析iis7.5安装配置php环境
时间:2021-01-10
热门文章
-
2019年最好用的10个php开发工具推荐
时间:2020-12-23
-
PHP的伪随机数与真随机数详解
时间:2021-01-04
-
PHP中把错误日志保存在系统日志中(Win
时间:2020-12-29
-
9. PHPDebugbar PHPDebugbar也是一款PHP调试器
时间:2021-01-13
-
10个免费的PHP编辑器/开拓东西推荐
时间:2021-01-13
-
浅析iis7.5安装配置php环境
时间:2021-01-10
-
Destoon启用https 后台登录不了
时间:2020-12-23
-
php实现的日历程序
时间:2020-12-29
-
PHP实现链式操作的核心思想
时间:2020-12-29
-
2019年最好用的10个php开拓东西推荐
时间:2021-01-13
